<?php
	include_once "dataservice.php";
	
	class baiviet_quanly_db
	{
		public function Them($ThongTinDS, $ThongTinBV)
		{
			$sql = "INSERT INTO `tbl_baiviet_quanly`(`ThongTinDS`, `ThongTinBV`) 
					VALUES ('$ThongTinDS', '$ThongTinBV')";
			
			$service = new dataservice();
			return $service->ExecuteNonQuery($sql);
		}
		
		public function CapNhat($ThongTinDS, $ThongTinBV)
		{
			$sql = "UPDATE 	`tbl_baiviet_quanly` 
					SET 	`ThongTinDS` = '$ThongTinDS',
							`ThongTinBV` = '$ThongTinBV' 
					WHERE 	1";
			
			$service = new dataservice();
			return $service->ExecuteNonQuery($sql);
		}
		
		public function LayDanhSach()
		{
			$sql = "SELECT * FROM `tbl_baiviet_quanly` WHERE 1";
			
			$service = new dataservice();
			return $service->ExecuteQuery($sql);
		}
	}
?>